package com.wanmait.zaisousuo.service;

import com.wanmait.zaisousuo.pojo.CompanyApproval;
import com.wanmait.zaisousuo.pojo.Userinfo;

import java.util.List;


public interface UserinfoService extends CommonService<Userinfo>{
    Userinfo findByEmail(String email);
    Userinfo login(String username, String password);
    Userinfo findByEmailAndPhone(String email,String phoneNumber);
    Userinfo findPassword(String username);
    Userinfo findByPhone(String phoneNumber);
    void insertByPhone(Userinfo userinfo);

    void updatePassword(String password, String username);

    Userinfo checkNickname(String nickname);

    void updateNickname(String nickname,Integer id);

    void updateEmail(String email,Integer id);

    void updatePhoneNumber(String phoneNumber, Integer id);

    void modPassword(String password, Integer id);

    void updateHeadPic(Userinfo userinfo);

    void checkVip(Userinfo userinfo);

    List<Userinfo> findVip(Integer userStates);

    String changeVipStatus(Integer id,Boolean flag);

    List<Userinfo> findAllCompany(Integer userStates);

    //修改公司审核状态
    String changeCompanyStatus(Integer id, Boolean flag);

    Integer banUser(Integer id);

    Integer recoverUser(Integer id);
}
